<div class="row">
	<div class="col-xs-12">
		<div class="">
			<div id="sidebar2" class="sidebar h-sidebar navbar-collapse collapse collapse_btn">
				<ul class="nav nav-list header-nav" id="header-nav">
					<php>
						$m = M('auth_rule');
						$dataaa = $m->where(array('pid'=>$id_3['pid'],'status'=>1))->order('sort')->select();
						foreach ($dataaa as $kkk=>$vvv){
							if(!$auth->check($vvv['name'], $_SESSION['aid']) && $_SESSION['aid']!= 1){
							unset($dataaa[$kkk]);
							}
						}
						//无下级菜单,则找兄弟菜单
						if(empty($dataaa)){
							$dataaa = $m->where(array('id'=>$id_3['pid']))->order('sort')->find();
							$dataaa = $m->where(array('pid'=>$dataaa['pid'],'status'=>1))->order('sort')->select();
							if(!$auth->check($vvv['name'], $_SESSION['aid']) && $_SESSION['aid']!= 1){
							unset($dataaa[$kkk]);
							}
						}
					</php>
					<foreach name="dataaa" item="k">
						<li>
							<a href="{:U(''.$k['name'].'')}">
								<o class="font12 <if condition="strtolower(CONTROLLER_NAME.'/'.ACTION_NAME) eq strtolower($k['name'])">rigbg</if>">{$k.title}</o>
							</a>

							<b class="arrow"></b>
						</li>
					</foreach>
				</ul><!-- /.nav-list -->
			</div><!-- .sidebar -->
		</div>
	</div><!-- /.col -->
</div><!-- /.row -->